import {createRouter,createWebHashHistory,createWebHistory,createMemoryHistory} from "vue-router"

let routes=[
    
    {
        path:"/",
        component:()=>import("../pages/home/index.vue"),
        name:"/",
        meta:{
            name:"导航首页",
            path:"/"
        },
        children:[
            {
                path:"discover",
                component:()=>import('../pages/discover/index.vue'),
                redirect: "/discover/playlist",
                name:"discover",
                meta:{
                    name:"发现首页"
                },
                children:[
                    {
                        path:"playlist",
                        component:()=>import("../pages/discover/playlist/index.vue"),
                        name:"playlist",
                        meta:{
                            name:"歌单"
                        }
                    }
                ]
            },
            {
                path:"mine",
                name:"mine",
                meta:{
                    name:"个人中心"
                },
                component:()=>import('../pages/mine/index.vue')
            },
            {
                props:true,
                path:"friend",
                name:"friend",
                meta:{
                    name:"朋友"
                },
                component:()=>import('../pages/friend/index.vue')
            },
        ]
    },
   
    {
        path:"/login",
        name:"login",
        meta:{
            name:"登录页"
        },
        component:()=>import('../pages/login/index.vue')
    }
]
let router=createRouter({
    history:createWebHashHistory("/base"),
    routes
})
export default router